home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
APP
/
A-D
/
BBEdit 2.2.2.sea
/
BBEdit 2.2.2
/
BBEdit Extensions
/
Sources
/
HelloWorld.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-02
|
429b
|
20 lines
#include "ExternalInterface.h"
/*
This trivial extension shows the use of NewDocument(),
Allocate(), and SetWindowContents().
*/
pascal void main(ExternalCallbackBlock *callbacks, WindowPtr w)
{
Handle h;
w = callbacks->NewDocument();
if (w) {
h = callbacks->Allocate(0, FALSE);
SetIText(h, "\pHello World");
callbacks->SetWindowContents(w, h);
// do NOT dispose of "h", since it now belongs to the window!
}
}